<?php
/**
 * Copyright              [HD框架] (C)2011-2012 houdunwang ，Inc. 
 * Encoding               UTF-8
 * Version                 $Id: modelView.php      2012-2-20  17:13:25
 * @author                向军
 * Link                       http://www.houdunwang.com       
 * E-mail                    houdunwang@gmail.com
 */
class userModel extends relationModel {
    public $join = array(
        'role' => array(//关联表
            'type' => 'MANY_TO_MANY', //包含一条主表记录
            'relation_table' => 'user_role', //中间关联表
            'relation_table_parent_key' => 'uid',
            'relation_table_foreign_key' => 'rid',
            'field' => 'rid,rname,title', //关联表检索的字段，起别名group_id
            "table"=>'role'
        )
    );
}

?>
